package rhc.discribute.signal.signalTouch;

import java.util.Collection;
import java.util.Map;

import rhc.discribute.access.signal.ReceiveMsg;
import rhc.discribute.node.host.Host;
import rhc.discribute.signal.SignalTouch;
import rhc.discribute.signal.signalInterface.ReceiveMsgSignal;

public class ReceiveMsgSignalTouch implements SignalTouch<ReceiveMsgSignal>{

	@Override
	public void touchSignal(Collection<ReceiveMsgSignal> signalInterfaces, Map<String, Object> signalObject) {
		
		if(null == signalObject){
			return;
		}
		
		Host fromHost=(Host) signalObject.get(ReceiveMsg.HOST);
		String message=(String) signalObject.get(ReceiveMsg.MESSAGE);
		
		for(ReceiveMsgSignal rms:signalInterfaces){
			rms.process(fromHost, message);
		}
	}

}

